#include "charThiefMage.h"

charThiefMage::charThiefMage(pole*** tab): character::character('g')
{
    character::pToBoard=tab;
    Life=6;
    Luck=10;
    Mana=10;
    firstChecked=0;
    PowersActive=0;
}

charThiefMage::charThiefMage(pole*** tab,int flag): character::character('g')
{
    character::pToBoard=tab;
    Life=6;
    Luck=10;
    Mana=10;
    firstChecked=0;
    PowersActive=0;
    loadGraphica("Grafika/p2.bmp","Grafika/bufor.bmp","Grafika/ThiefMageFace.bmp");
}

charThiefMage::~charThiefMage()
{
    //dtor
}
int charThiefMage::SpecialPower(SDL_Event& event,SDL_Surface* screen){

        if(event.type==SDL_MOUSEBUTTONDOWN){
            if(event.button.button==SDL_BUTTON_LEFT){

                SDL_GetMouseState(&mouseXstate,&mouseYstate);
                if(mouseYstate>FACE_POSITION_Y_PX && mouseYstate<FACE_POSITION_Y_PX+FACE_SIZE_IMAGE_PX){
                    if(mouseXstate>FACE_POSITION_X_PX && mouseXstate<FACE_POSITION_X_PX+FACE_SIZE_IMAGE_PX/2){
                        PowersActive=1;
                        return 0;
                    }
                    if(mouseXstate>FACE_POSITION_X_PX+FACE_SIZE_IMAGE_PX/2 && mouseXstate<FACE_POSITION_X_PX+FACE_SIZE_IMAGE_PX){
                        PowersActive=2;
                        return 0;
                    }
                }
            }
        }


    if(PowersActive==1){
        return charThief::SpecialPower(event,screen);
    }
    if(PowersActive==2){
        return charMage::SpecialPower(event,screen);
    }

    return 0;
}

